﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="js/ZeroClipboard.js"></script>
    <script src="js/jquery.js"></script>
<script type="text/javascript">
    var clip = null;

    function init() {
        
        clip = new ZeroClipboard.Client();
        
        clip.setHandCursor(true);
        clip.addEventListener('mouseover', function (client) {
            // update the text on mouse over
            clip.setText($('#fe_text').val());
        });

        clip.addEventListener('complete', function (client, text) {
            //debugstr("Copied text to clipboard: " + text );
            alert("该地址已经复制，你可以使用Ctrl+V 粘贴。");
        });

        clip.glue('clip_button', 'clip_container');
    }

    $(function () {

        init();
    });
</script>
</head>
<body >

<textarea id="fe_text" cols=50 rows=5 >复制内容文本1</textarea>
<span id="clip_container"><span id="clip_button">复制</span></span>

</body>
</html>
